package controller;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;

public class Checkout extends HttpServlet
{
	public void doPost(HttpServletRequest request, HttpServletResponse response)
	{
		String continueAll = request.getParameter("continueShopping");
		String payment = request.getParameter("payment");
		String address = "";
		
		try 
		{
			if(continueAll != null)
				{ address = "/WEB-INF/search.jsp"; }
			else
				{ address= "/WEB-INF/payment.jsp"; }
			
			RequestDispatcher dispatcher = request.getRequestDispatcher(address);
			dispatcher.forward(request, response);
		} catch (ServletException e) { e.printStackTrace();
		} catch (IOException e) { e.printStackTrace();
		}
	}
}
